This invention relates to intermediate controllers that transparently duplicate host data utilizing multiple connections to differing end devices such as data storage devices, and, more particularly, to the scheduling of jobs for the connections to the end devices, with the goal of increasing the overall throughput of the system.
Intermediate controllers may employ multiple single port adapters or may employ an adapter within the controller having multiple input/output ports in order to allow the transfer of data to and from more than one receiving device or subsystem, and to allow the transfers to be parallel and often independent, so as to provide high throughput. The intermediate controller may be connected to one or more hosts through one or more host adapters and ports. The end devices may comprise separate receiving devices, or may comprise multiple devices in a single receiving subsystem. An example comprises a data storage subsystem having dual data storage libraries for duplicating the stored data. A controller may comprise data processors and memory coupling to the adapters with a PCI bus, such as an IBM RS-6000 processor. In turn, each of the adapters may comprise data processors and memory along with interfaces appropriate to the connection types of the ports they contain, such as ESCON, FICON, SCSI, FIBER CHANNEL, etc.
The controller and each adapter may be provided with appropriate operating systems and application programs for operating the controller and input/output adapter to conduct the data transfer and other needed functions.
In many situations, however, the transfer of data may be between two of the end storage devices coupled to the input/output ports, as well as the primary function of transferring data from the host to one or more of the end storage devices coupled to the input/output ports. Thus, the transfers through the input/output ports are no longer independent of each other, and the operation of one input/output port is dependent upon the availability of data from the other input/output port. As an example, it may be desirable to copy data from a subsystem at one input/output port to another subsystem at another input/output port in a copy operation. Typically, this involves a read job at one input/output port and a write job at the other input/output port. A number of jobs may be queued at each of the ports, and the read and write jobs must wait until they reach the end of the queue. However, at times, the other, independent operations at one of the input/output ports may be conducted slowly as compared to the operations at the other input/output port. Alternatively, or additionally, the number of queued jobs at one of the input/output ports may greatly exceed the number of queued jobs at the other input/output port. In either case, the operation at the other input/output port, which may be the write job, may have to be idle and wait until the job at the one input/output port, the read job, reaches the end of the queue and is processed.
A specific example of the need to copy is the redundant storage of data in dual libraries. The data may be initially received from a host system and stored in one of the libraries by the controller through an adapter, and then the host is released. The controller will then, at a subsequent time, read the data from the one library and write it to the dual library, thereby creating a copy of the data. The data cannot be written to the dual library until it is read from the one library. Thus, the write job at the other input/output port must wait until the read job at the one input/output port reaches the end of the queue and is processed.
As the result, one of the input/output ports must be in wait mode at such times, reducing the throughput of the controller at the multiple ports, with the further result that the overall use of the controller becomes less efficient.
An object of the present invention is to increase the throughput of a controller through multiple ports, increasing the efficiency of the controller.
Disclosed are a controller and method for scheduling jobs at input/output ports. The controller comprises a plurality of queues, each associated with one of the input/output ports, and at least one processor. The processor arranges the jobs in each of the queues in a normal queued order for selection by the associated port. Upon selecting a next job for one of the ports, the processor determines the number of queued jobs of each of the queues for each of the other ports. The processor determines whether the number of queued jobs of each queue for the other ports is less than a threshold. If the number of jobs is less than the threshold, meaning that any job thereat coordinating with the one port would have to wait for the one port to complete before proceeding, the processor selects the next job for the one port from the jobs in the queue for the one port which is identified as one that may be conducted out of queue order, for example, as having a relationship with the other port; else, the processor selects the next job for the one port from the jobs in the queue for the one port on the normal queued basis. Identification may be made by attaching heuristic information to the queued job. As an example, the job may be part of an operation involving two of the ports, and the invention thus gives the job priority so that another port is less likely to have to be idle while waiting for the one port.
In one embodiment, the controller may comprise a multi-port adapter for providing the multiple ports, and the controller may attach the hueristic information to jobs of the adapter queues. In another embodiment, the controller may comprise a plurality of single port adapters and may maintain the queues and job identification.